﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SkyFab.Master" AutoEventWireup="true" CodeBehind="CustomerInvoiceList.aspx.cs" Inherits="Web.CustomerInvoiceList" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SubMenuPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<asp:Label ID="FlashMessageLabel" runat="server"></asp:Label>
<asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
<h1>Customer Invoice List</h1>
    <div class="span-18">
    <fieldset>
    <legend>Search Customer Invoice</legend>
    <p>
    <label>Search By Customer:</label>
    <asp:DropDownList ID="CustomerDropDownList" runat="server" Width="150"></asp:DropDownList>
    <asp:Button ID="CustomerSearchButton" Text="Search" runat="server" 
            onclick="CustomerSearchButton_Click" CssClass="submitButton" />
    </p>

    <p>
    <label>Search By Invoice No:</label>
    <asp:TextBox ID="InvoiceNoTextBox" runat="server" CssClass="text" Width="200"></asp:TextBox>
    <asp:Button ID="InvoiceNoSearchButton" Text="Search" runat="server" 
            onclick="InvoiceNoSearchButton_Click" CssClass="submitButton" />
    </p>
    
    <p>
    <label>Search By Date: From</label>
    <asp:TextBox ID="FromTextBox" runat="server" CssClass="text" Width="150"></asp:TextBox>
    <asp:CalendarExtender ID="FromTextBox_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="FromTextBox" Format="d MMM, yyyy">
                </asp:CalendarExtender>
    <label>To </label>
    <asp:TextBox ID="ToTextBox" runat="server" CssClass="text" Width="150"></asp:TextBox>
    <asp:CalendarExtender ID="ToTextBox_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="ToTextBox" Format="d MMM, yyyy">
                </asp:CalendarExtender>
    <asp:Button ID="DateSearchButton" Text="Search" runat="server" 
            onclick="DateSearchButton_Click" CssClass="submitButton" />
    </p>
    </fieldset>

    </div>


   <div class="span-18">
   <asp:GridView ID="CustomerInvoiceListGridView" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CssClass="gridview" 
        onpageindexchanging="CustomerInvoiceListGridView_PageIndexChanging">
        <Columns>
            <asp:TemplateField HeaderText="Invoice No.">
            <ItemTemplate>
                  <asp:HyperLink ID="InvoiceNoHyperLink" runat="server" NavigateUrl='<%# "CustomerInvoiceDetail.aspx?custInvoiceId="+Eval("CustomerInvoiceId") %>'><%# Eval("CustomerInvoiceNo")%></asp:HyperLink>
            </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="CustomerShortName" HeaderText="Vendor" />
            <asp:BoundField DataField="CustomerInvoiceDate" 
                DataFormatString="{0:d MMM, yyyy}" HeaderText="Date" />
        </Columns>
        <AlternatingRowStyle BackColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle HorizontalAlign="Center" CssClass="pagerTable" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
   </div>
    
</asp:Content>
